$(function () {
    $('.share').click(function () {
        var json = {
            action: "share",
            params: {
                imageUrl:"http://i9.qhimg.com/t017d891ca365ef60b5.jpg",
                url:"https://www.douban.com",
                title:"微信分享测试",
                text:"我是微信分享测试内容"
            }
        };

        if(window.latte){
            latte.event(JSON.stringify(json));
        }else{
            alert("latte ont found")
        }

    });

    $('.comment').click(function () {

            var json = {
                action: "comment"
            };

        if(window.latte){
            latte.event(JSON.stringify(json));
        }else{
            alert("latte ont found")
        }

        });
});